package com.hxkj.dao.impl;

import com.hxkj.dao.RoleSiteDao;
import com.hxkj.mapper.RoleSiteMapper;
import com.hxkj.domain.po.RoleSite;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-05-21 17:59:26
*
*/
@Service("roleSiteDao")
public class RoleSiteDaoImpl implements RoleSiteDao {

    @Resource
    private RoleSiteMapper roleSiteMapper;

    @Override
    public RoleSite get(Long id) {
        return roleSiteMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<RoleSite> get(RoleSite roleSite) {
        return roleSiteMapper.select(roleSite);
    }

    @Override
    public int delete(Long id) {
        return roleSiteMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int delete(RoleSite roleSite) {
        return roleSiteMapper.delete(roleSite);
    }

    @Override
    public int save(RoleSite roleSite) {
        return roleSiteMapper.insert(roleSite);
    }

    @Override
    public int update(RoleSite roleSite) {
        return roleSiteMapper.update(roleSite);
    }
}
